package Waya::Base;

use strict;
use warnings;
use Waya::Log;

our $VERSION = '0.1';

use base qw(
    Class::Accessor::Complex
    Class::Accessor::Constructor
    Data::Inherited
);


__PACKAGE__->mk_constructor('new');


sub init {}


# Convenience method so subclasses don't need to say
#
#   use Waya::Log;
#   my $log = Waya::Log;
#   $log->info(...);
#
# or
#
#   Waya::Log->debug(...);
#
# but can say
#
#   $self->log->info(...);
#
# Eliminating fixed package names is also a way of decoupling; later on we
# might choose to get the log from the delegate or anywhere else, in which
# case we can make the change in one location - here.

sub log { Waya::Log->instance }


1;
